<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/include/linux/lockdep.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/include/linux/lockdep.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="k">/*</span>
<a name="2" /><span class="True">       2:</span> <span class="k"> * Runtime locking correctness validator</span>
<a name="3" /><span class="True">       3:</span> <span class="k"> *</span>
<a name="4" /><span class="True">       4:</span> <span class="k"> *  Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar &lt;mingo@redhat.com&gt;</span>
<a name="5" /><span class="True">       5:</span> <span class="k"> *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra &lt;pzijlstr@redhat.com&gt;</span>
<a name="6" /><span class="True">       6:</span> <span class="k"> *</span>
<a name="7" /><span class="True">       7:</span> <span class="k"> * see Documentation/lockdep-design.txt for more details.</span>
<a name="8" /><span class="True">       8:</span> <span class="k"> */</span>
<a name="9" /><span class="Maybe">       9:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_X19MSU5VWF9MT0NLREVQX0hfMA__"><span class="b">__LINUX_LOCKDEP_H</span></a>
<a name="10" /><span class="Maybe">      10:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_X19MSU5VWF9MT0NLREVQX0hfMA__"><span class="b">__LINUX_LOCKDEP_H</span></a>
<a name="11" /><span class="Maybe">      11:</span> 
<a name="12" /><span class="Maybe">      12:</span> <span class="m">struct</span> <span class="b">task_struct</span><span class="f">;</span>
<a name="13" /><span class="Maybe">      13:</span> <span class="m">struct</span> <span class="b">lockdep_map</span><span class="f">;</span>
<a name="14" /><span class="Maybe">      14:</span> 
<a name="15" /><span class="Maybe">      15:</span> <span class="k">/* for sysctl */</span>
<a name="16" /><span class="Maybe">      16:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">prove_locking</span><span class="f">;</span>
<a name="17" /><span class="Maybe">      17:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">lock_stat</span><span class="f">;</span>
<a name="18" /><span class="Maybe">      18:</span> 
<a name="19" /><span class="False">      19:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_LOCKDEP</span>
<a name="20" /><span class="False">      20:</span> 
<a name="21" /><span class="False">      21:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">linkage</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="22" /><span class="False">      22:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">list</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="23" /><span class="False">      23:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">debug_locks</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="24" /><span class="False">      24:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">stacktrace</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="25" /><span class="False">      25:</span> 
<a name="26" /><span class="False">      26:</span> <span class="k">/*</span>
<a name="27" /><span class="False">      27:</span> <span class="k"> * We&apos;d rather not expose kernel/lockdep_states.h this wide, but we do need</span>
<a name="28" /><span class="False">      28:</span> <span class="k"> * the total number of states... :-(</span>
<a name="29" /><span class="False">      29:</span> <span class="k"> */</span>
<a name="30" /><span class="False">      30:</span> <span class="f">#</span><span class="n">define</span> <span class="b">XXX_LOCK_USAGE_STATES</span>        <span class="f">(</span><span class="c">1</span><span class="f">+</span><span class="c">3</span><span class="f">*</span><span class="c">4</span><span class="f">)</span>
<a name="31" /><span class="False">      31:</span> 
<a name="32" /><span class="False">      32:</span> <span class="f">#</span><span class="n">define</span> <span class="b">MAX_LOCKDEP_SUBCLASSES</span>        <span class="c">8UL</span>
<a name="33" /><span class="False">      33:</span> 
<a name="34" /><span class="False">      34:</span> <span class="k">/*</span>
<a name="35" /><span class="False">      35:</span> <span class="k"> * NR_LOCKDEP_CACHING_CLASSES ... Number of classes</span>
<a name="36" /><span class="False">      36:</span> <span class="k"> * cached in the instance of lockdep_map</span>
<a name="37" /><span class="False">      37:</span> <span class="k"> *</span>
<a name="38" /><span class="False">      38:</span> <span class="k"> * Currently main class (subclass == 0) and signle depth subclass</span>
<a name="39" /><span class="False">      39:</span> <span class="k"> * are cached in lockdep_map. This optimization is mainly targeting</span>
<a name="40" /><span class="False">      40:</span> <span class="k"> * on rq-&gt;lock. double_rq_lock() acquires this highly competitive with</span>
<a name="41" /><span class="False">      41:</span> <span class="k"> * single depth.</span>
<a name="42" /><span class="False">      42:</span> <span class="k"> */</span>
<a name="43" /><span class="False">      43:</span> <span class="f">#</span><span class="n">define</span> <span class="b">NR_LOCKDEP_CACHING_CLASSES</span>    <span class="c">2</span>
<a name="44" /><span class="False">      44:</span> 
<a name="45" /><span class="False">      45:</span> <span class="k">/*</span>
<a name="46" /><span class="False">      46:</span> <span class="k"> * Lock-classes are keyed via unique addresses, by embedding the</span>
<a name="47" /><span class="False">      47:</span> <span class="k"> * lockclass-key into the kernel (or module) .data section. (For</span>
<a name="48" /><span class="False">      48:</span> <span class="k"> * static locks we use the lock address itself as the key.)</span>
<a name="49" /><span class="False">      49:</span> <span class="k"> */</span>
<a name="50" /><span class="False">      50:</span> <span class="m">struct</span> <span class="b">lockdep_subclass_key</span> <span class="f">{</span>
<a name="51" /><span class="False">      51:</span>     <span class="m">char</span> <span class="b">__one_byte</span><span class="f">;</span>
<a name="52" /><span class="False">      52:</span> <span class="f">}</span> <span class="b">__attribute__</span> <span class="f">(</span><span class="f">(</span><span class="b">__packed__</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="53" /><span class="False">      53:</span> 
<a name="54" /><span class="False">      54:</span> <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="f">{</span>
<a name="55" /><span class="False">      55:</span>     <span class="m">struct</span> <span class="b">lockdep_subclass_key</span>    <span class="b">subkeys</span><span class="f">[</span><span class="b">MAX_LOCKDEP_SUBCLASSES</span><span class="f">]</span><span class="f">;</span>
<a name="56" /><span class="False">      56:</span> <span class="f">}</span><span class="f">;</span>
<a name="57" /><span class="False">      57:</span> 
<a name="58" /><span class="False">      58:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="b">__lockdep_no_validate__</span><span class="f">;</span>
<a name="59" /><span class="False">      59:</span> 
<a name="60" /><span class="False">      60:</span> <span class="f">#</span><span class="n">define</span> <span class="b">LOCKSTAT_POINTS</span>        <span class="c">4</span>
<a name="61" /><span class="False">      61:</span> 
<a name="62" /><span class="False">      62:</span> <span class="k">/*</span>
<a name="63" /><span class="False">      63:</span> <span class="k"> * The lock-class itself:</span>
<a name="64" /><span class="False">      64:</span> <span class="k"> */</span>
<a name="65" /><span class="False">      65:</span> <span class="m">struct</span> <span class="b">lock_class</span> <span class="f">{</span>
<a name="66" /><span class="False">      66:</span>     <span class="k">/*</span>
<a name="67" /><span class="False">      67:</span> <span class="k">     * class-hash:</span>
<a name="68" /><span class="False">      68:</span> <span class="k">     */</span>
<a name="69" /><span class="False">      69:</span>     <span class="m">struct</span> <span class="b">list_head</span>        <span class="b">hash_entry</span><span class="f">;</span>
<a name="70" /><span class="False">      70:</span> 
<a name="71" /><span class="False">      71:</span>     <span class="k">/*</span>
<a name="72" /><span class="False">      72:</span> <span class="k">     * global list of all lock-classes:</span>
<a name="73" /><span class="False">      73:</span> <span class="k">     */</span>
<a name="74" /><span class="False">      74:</span>     <span class="m">struct</span> <span class="b">list_head</span>        <span class="b">lock_entry</span><span class="f">;</span>
<a name="75" /><span class="False">      75:</span> 
<a name="76" /><span class="False">      76:</span>     <span class="m">struct</span> <span class="b">lockdep_subclass_key</span>    <span class="f">*</span><span class="b">key</span><span class="f">;</span>
<a name="77" /><span class="False">      77:</span>     <span class="m">unsigned</span> <span class="m">int</span>            <span class="b">subclass</span><span class="f">;</span>
<a name="78" /><span class="False">      78:</span>     <span class="m">unsigned</span> <span class="m">int</span>            <span class="b">dep_gen_id</span><span class="f">;</span>
<a name="79" /><span class="False">      79:</span> 
<a name="80" /><span class="False">      80:</span>     <span class="k">/*</span>
<a name="81" /><span class="False">      81:</span> <span class="k">     * IRQ/softirq usage tracking bits:</span>
<a name="82" /><span class="False">      82:</span> <span class="k">     */</span>
<a name="83" /><span class="False">      83:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">usage_mask</span><span class="f">;</span>
<a name="84" /><span class="False">      84:</span>     <span class="m">struct</span> <span class="b">stack_trace</span>        <span class="b">usage_traces</span><span class="f">[</span><span class="b">XXX_LOCK_USAGE_STATES</span><span class="f">]</span><span class="f">;</span>
<a name="85" /><span class="False">      85:</span> 
<a name="86" /><span class="False">      86:</span>     <span class="k">/*</span>
<a name="87" /><span class="False">      87:</span> <span class="k">     * These fields represent a directed graph of lock dependencies,</span>
<a name="88" /><span class="False">      88:</span> <span class="k">     * to every node we attach a list of &quot;forward&quot; and a list of</span>
<a name="89" /><span class="False">      89:</span> <span class="k">     * &quot;backward&quot; graph nodes.</span>
<a name="90" /><span class="False">      90:</span> <span class="k">     */</span>
<a name="91" /><span class="False">      91:</span>     <span class="m">struct</span> <span class="b">list_head</span>        <span class="b">locks_after</span><span class="f">,</span> <span class="b">locks_before</span><span class="f">;</span>
<a name="92" /><span class="False">      92:</span> 
<a name="93" /><span class="False">      93:</span>     <span class="k">/*</span>
<a name="94" /><span class="False">      94:</span> <span class="k">     * Generation counter, when doing certain classes of graph walking,</span>
<a name="95" /><span class="False">      95:</span> <span class="k">     * to ensure that we check one node only once:</span>
<a name="96" /><span class="False">      96:</span> <span class="k">     */</span>
<a name="97" /><span class="False">      97:</span>     <span class="m">unsigned</span> <span class="m">int</span>            <span class="b">version</span><span class="f">;</span>
<a name="98" /><span class="False">      98:</span> 
<a name="99" /><span class="False">      99:</span>     <span class="k">/*</span>
<a name="100" /><span class="False">     100:</span> <span class="k">     * Statistics counter:</span>
<a name="101" /><span class="False">     101:</span> <span class="k">     */</span>
<a name="102" /><span class="False">     102:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">ops</span><span class="f">;</span>
<a name="103" /><span class="False">     103:</span> 
<a name="104" /><span class="False">     104:</span>     <span class="m">const</span> <span class="m">char</span>            <span class="f">*</span><span class="b">name</span><span class="f">;</span>
<a name="105" /><span class="False">     105:</span>     <span class="m">int</span>                <span class="b">name_version</span><span class="f">;</span>
<a name="106" /><span class="False">     106:</span> 
<a name="107" /><span class="False">     107:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_LOCK_STAT</span>
<a name="108" /><span class="False">     108:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">contention_point</span><span class="f">[</span><span class="b">LOCKSTAT_POINTS</span><span class="f">]</span><span class="f">;</span>
<a name="109" /><span class="False">     109:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">contending_point</span><span class="f">[</span><span class="b">LOCKSTAT_POINTS</span><span class="f">]</span><span class="f">;</span>
<a name="110" /><span class="False">     110:</span> <span class="f">#</span><span class="n">endif</span>
<a name="111" /><span class="False">     111:</span> <span class="f">}</span><span class="f">;</span>
<a name="112" /><span class="False">     112:</span> 
<a name="113" /><span class="False">     113:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_LOCK_STAT</span>
<a name="114" /><span class="False">     114:</span> <span class="m">struct</span> <span class="b">lock_time</span> <span class="f">{</span>
<a name="115" /><span class="False">     115:</span>     <span class="b">s64</span>                <a href="cpu.c_macros_noref.html#_bWluXzA_"><span class="b">min</span></a><span class="f">;</span>
<a name="116" /><span class="False">     116:</span>     <span class="b">s64</span>                <a href="cpu.c_macros_ref.html#_bWF4XzA_"><span class="b">max</span></a><span class="f">;</span>
<a name="117" /><span class="False">     117:</span>     <span class="b">s64</span>                <span class="b">total</span><span class="f">;</span>
<a name="118" /><span class="False">     118:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">nr</span><span class="f">;</span>
<a name="119" /><span class="False">     119:</span> <span class="f">}</span><span class="f">;</span>
<a name="120" /><span class="False">     120:</span> 
<a name="121" /><span class="False">     121:</span> <span class="m">enum</span> <span class="b">bounce_type</span> <span class="f">{</span>
<a name="122" /><span class="False">     122:</span>     <span class="b">bounce_acquired_write</span><span class="f">,</span>
<a name="123" /><span class="False">     123:</span>     <span class="b">bounce_acquired_read</span><span class="f">,</span>
<a name="124" /><span class="False">     124:</span>     <span class="b">bounce_contended_write</span><span class="f">,</span>
<a name="125" /><span class="False">     125:</span>     <span class="b">bounce_contended_read</span><span class="f">,</span>
<a name="126" /><span class="False">     126:</span>     <span class="b">nr_bounce_types</span><span class="f">,</span>
<a name="127" /><span class="False">     127:</span> 
<a name="128" /><span class="False">     128:</span>     <span class="b">bounce_acquired</span> <span class="f">=</span> <span class="b">bounce_acquired_write</span><span class="f">,</span>
<a name="129" /><span class="False">     129:</span>     <span class="b">bounce_contended</span> <span class="f">=</span> <span class="b">bounce_contended_write</span><span class="f">,</span>
<a name="130" /><span class="False">     130:</span> <span class="f">}</span><span class="f">;</span>
<a name="131" /><span class="False">     131:</span> 
<a name="132" /><span class="False">     132:</span> <span class="m">struct</span> <span class="b">lock_class_stats</span> <span class="f">{</span>
<a name="133" /><span class="False">     133:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">contention_point</span><span class="f">[</span><span class="c">4</span><span class="f">]</span><span class="f">;</span>
<a name="134" /><span class="False">     134:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">contending_point</span><span class="f">[</span><span class="c">4</span><span class="f">]</span><span class="f">;</span>
<a name="135" /><span class="False">     135:</span>     <span class="m">struct</span> <span class="b">lock_time</span>        <span class="b">read_waittime</span><span class="f">;</span>
<a name="136" /><span class="False">     136:</span>     <span class="m">struct</span> <span class="b">lock_time</span>        <span class="b">write_waittime</span><span class="f">;</span>
<a name="137" /><span class="False">     137:</span>     <span class="m">struct</span> <span class="b">lock_time</span>        <span class="b">read_holdtime</span><span class="f">;</span>
<a name="138" /><span class="False">     138:</span>     <span class="m">struct</span> <span class="b">lock_time</span>        <span class="b">write_holdtime</span><span class="f">;</span>
<a name="139" /><span class="False">     139:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">bounces</span><span class="f">[</span><span class="b">nr_bounce_types</span><span class="f">]</span><span class="f">;</span>
<a name="140" /><span class="False">     140:</span> <span class="f">}</span><span class="f">;</span>
<a name="141" /><span class="False">     141:</span> 
<a name="142" /><span class="False">     142:</span> <span class="m">struct</span> <span class="b">lock_class_stats</span> <span class="b">lock_stats</span><span class="f">(</span><span class="m">struct</span> <span class="b">lock_class</span> <span class="f">*</span><span class="m">class</span><span class="f">)</span><span class="f">;</span>
<a name="143" /><span class="False">     143:</span> <span class="m">void</span> <span class="b">clear_lock_stats</span><span class="f">(</span><span class="m">struct</span> <span class="b">lock_class</span> <span class="f">*</span><span class="m">class</span><span class="f">)</span><span class="f">;</span>
<a name="144" /><span class="False">     144:</span> <span class="f">#</span><span class="n">endif</span>
<a name="145" /><span class="False">     145:</span> 
<a name="146" /><span class="False">     146:</span> <span class="k">/*</span>
<a name="147" /><span class="False">     147:</span> <span class="k"> * Map the lock object (the lock instance) to the lock-class object.</span>
<a name="148" /><span class="False">     148:</span> <span class="k"> * This is embedded into specific lock instances:</span>
<a name="149" /><span class="False">     149:</span> <span class="k"> */</span>
<a name="150" /><span class="False">     150:</span> <span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">{</span>
<a name="151" /><span class="False">     151:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span>        <span class="f">*</span><span class="b">key</span><span class="f">;</span>
<a name="152" /><span class="False">     152:</span>     <span class="m">struct</span> <span class="b">lock_class</span>        <span class="f">*</span><span class="b">class_cache</span><span class="f">[</span><span class="b">NR_LOCKDEP_CACHING_CLASSES</span><span class="f">]</span><span class="f">;</span>
<a name="153" /><span class="False">     153:</span>     <span class="m">const</span> <span class="m">char</span>            <span class="f">*</span><span class="b">name</span><span class="f">;</span>
<a name="154" /><span class="False">     154:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_LOCK_STAT</span>
<a name="155" /><span class="False">     155:</span>     <span class="m">int</span>                <span class="b">cpu</span><span class="f">;</span>
<a name="156" /><span class="False">     156:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">ip</span><span class="f">;</span>
<a name="157" /><span class="False">     157:</span> <span class="f">#</span><span class="n">endif</span>
<a name="158" /><span class="False">     158:</span> <span class="f">}</span><span class="f">;</span>
<a name="159" /><span class="False">     159:</span> 
<a name="160" /><span class="False">     160:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">lockdep_copy_map</span><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">to</span><span class="f">,</span>
<a name="161" /><span class="False">     161:</span>                     <span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">from</span><span class="f">)</span>
<a name="162" /><span class="False">     162:</span> <span class="f">{</span>
<a name="163" /><span class="False">     163:</span>     <span class="m">int</span> <span class="b">i</span><span class="f">;</span>
<a name="164" /><span class="False">     164:</span> 
<a name="165" /><span class="False">     165:</span>     <span class="f">*</span><span class="b">to</span> <span class="f">=</span> <span class="f">*</span><span class="b">from</span><span class="f">;</span>
<a name="166" /><span class="False">     166:</span>     <span class="k">/*</span>
<a name="167" /><span class="False">     167:</span> <span class="k">     * Since the class cache can be modified concurrently we could observe</span>
<a name="168" /><span class="False">     168:</span> <span class="k">     * half pointers (64bit arch using 32bit copy insns). Therefore clear</span>
<a name="169" /><span class="False">     169:</span> <span class="k">     * the caches and take the performance hit.</span>
<a name="170" /><span class="False">     170:</span> <span class="k">     *</span>
<a name="171" /><span class="False">     171:</span> <span class="k">     * XXX it doesn&apos;t work well with lockdep_set_class_and_subclass(), since</span>
<a name="172" /><span class="False">     172:</span> <span class="k">     *     that relies on cache abuse.</span>
<a name="173" /><span class="False">     173:</span> <span class="k">     */</span>
<a name="174" /><span class="False">     174:</span>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">NR_LOCKDEP_CACHING_CLASSES</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span>
<a name="175" /><span class="False">     175:</span>         <span class="b">to</span><span class="f">-&gt;</span><span class="b">class_cache</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="176" /><span class="False">     176:</span> <span class="f">}</span>
<a name="177" /><span class="False">     177:</span> 
<a name="178" /><span class="False">     178:</span> <span class="k">/*</span>
<a name="179" /><span class="False">     179:</span> <span class="k"> * Every lock has a list of other locks that were taken after it.</span>
<a name="180" /><span class="False">     180:</span> <span class="k"> * We only grow the list, never remove from it:</span>
<a name="181" /><span class="False">     181:</span> <span class="k"> */</span>
<a name="182" /><span class="False">     182:</span> <span class="m">struct</span> <span class="b">lock_list</span> <span class="f">{</span>
<a name="183" /><span class="False">     183:</span>     <span class="m">struct</span> <span class="b">list_head</span>        <span class="b">entry</span><span class="f">;</span>
<a name="184" /><span class="False">     184:</span>     <span class="m">struct</span> <span class="b">lock_class</span>        <span class="f">*</span><span class="m">class</span><span class="f">;</span>
<a name="185" /><span class="False">     185:</span>     <span class="m">struct</span> <span class="b">stack_trace</span>        <span class="b">trace</span><span class="f">;</span>
<a name="186" /><span class="False">     186:</span>     <span class="m">int</span>                <span class="b">distance</span><span class="f">;</span>
<a name="187" /><span class="False">     187:</span> 
<a name="188" /><span class="False">     188:</span>     <span class="k">/*</span>
<a name="189" /><span class="False">     189:</span> <span class="k">     * The parent field is used to implement breadth-first search, and the</span>
<a name="190" /><span class="False">     190:</span> <span class="k">     * bit 0 is reused to indicate if the lock has been accessed in BFS.</span>
<a name="191" /><span class="False">     191:</span> <span class="k">     */</span>
<a name="192" /><span class="False">     192:</span>     <span class="m">struct</span> <span class="b">lock_list</span>        <span class="f">*</span><span class="b">parent</span><span class="f">;</span>
<a name="193" /><span class="False">     193:</span> <span class="f">}</span><span class="f">;</span>
<a name="194" /><span class="False">     194:</span> 
<a name="195" /><span class="False">     195:</span> <span class="k">/*</span>
<a name="196" /><span class="False">     196:</span> <span class="k"> * We record lock dependency chains, so that we can cache them:</span>
<a name="197" /><span class="False">     197:</span> <span class="k"> */</span>
<a name="198" /><span class="False">     198:</span> <span class="m">struct</span> <span class="b">lock_chain</span> <span class="f">{</span>
<a name="199" /><span class="False">     199:</span>     <span class="b">u8</span>                <span class="b">irq_context</span><span class="f">;</span>
<a name="200" /><span class="False">     200:</span>     <span class="b">u8</span>                <span class="b">depth</span><span class="f">;</span>
<a name="201" /><span class="False">     201:</span>     <span class="b">u16</span>                <span class="b">base</span><span class="f">;</span>
<a name="202" /><span class="False">     202:</span>     <span class="m">struct</span> <span class="b">list_head</span>        <span class="b">entry</span><span class="f">;</span>
<a name="203" /><span class="False">     203:</span>     <span class="b">u64</span>                <span class="b">chain_key</span><span class="f">;</span>
<a name="204" /><span class="False">     204:</span> <span class="f">}</span><span class="f">;</span>
<a name="205" /><span class="False">     205:</span> 
<a name="206" /><span class="False">     206:</span> <span class="f">#</span><span class="n">define</span> <span class="b">MAX_LOCKDEP_KEYS_BITS</span>        <span class="c">13</span>
<a name="207" /><span class="False">     207:</span> <span class="k">/*</span>
<a name="208" /><span class="False">     208:</span> <span class="k"> * Subtract one because we offset hlock-&gt;class_idx by 1 in order</span>
<a name="209" /><span class="False">     209:</span> <span class="k"> * to make 0 mean no class. This avoids overflowing the class_idx</span>
<a name="210" /><span class="False">     210:</span> <span class="k"> * bitfield and hitting the BUG in hlock_class().</span>
<a name="211" /><span class="False">     211:</span> <span class="k"> */</span>
<a name="212" /><span class="False">     212:</span> <span class="f">#</span><span class="n">define</span> <span class="b">MAX_LOCKDEP_KEYS</span>        <span class="f">(</span><span class="f">(</span><span class="c">1UL</span> <span class="f">&lt;&lt;</span> <span class="b">MAX_LOCKDEP_KEYS_BITS</span><span class="f">)</span> <span class="f">-</span> <span class="c">1</span><span class="f">)</span>
<a name="213" /><span class="False">     213:</span> 
<a name="214" /><span class="False">     214:</span> <span class="m">struct</span> <span class="b">held_lock</span> <span class="f">{</span>
<a name="215" /><span class="False">     215:</span>     <span class="k">/*</span>
<a name="216" /><span class="False">     216:</span> <span class="k">     * One-way hash of the dependency chain up to this point. We</span>
<a name="217" /><span class="False">     217:</span> <span class="k">     * hash the hashes step by step as the dependency chain grows.</span>
<a name="218" /><span class="False">     218:</span> <span class="k">     *</span>
<a name="219" /><span class="False">     219:</span> <span class="k">     * We use it for dependency-caching and we skip detection</span>
<a name="220" /><span class="False">     220:</span> <span class="k">     * passes and dependency-updates if there is a cache-hit, so</span>
<a name="221" /><span class="False">     221:</span> <span class="k">     * it is absolutely critical for 100% coverage of the validator</span>
<a name="222" /><span class="False">     222:</span> <span class="k">     * to have a unique key value for every unique dependency path</span>
<a name="223" /><span class="False">     223:</span> <span class="k">     * that can occur in the system, to make a unique hash value</span>
<a name="224" /><span class="False">     224:</span> <span class="k">     * as likely as possible - hence the 64-bit width.</span>
<a name="225" /><span class="False">     225:</span> <span class="k">     *</span>
<a name="226" /><span class="False">     226:</span> <span class="k">     * The task struct holds the current hash value (initialized</span>
<a name="227" /><span class="False">     227:</span> <span class="k">     * with zero), here we store the previous hash value:</span>
<a name="228" /><span class="False">     228:</span> <span class="k">     */</span>
<a name="229" /><span class="False">     229:</span>     <span class="b">u64</span>                <span class="b">prev_chain_key</span><span class="f">;</span>
<a name="230" /><span class="False">     230:</span>     <span class="m">unsigned</span> <span class="m">long</span>            <span class="b">acquire_ip</span><span class="f">;</span>
<a name="231" /><span class="False">     231:</span>     <span class="m">struct</span> <span class="b">lockdep_map</span>        <span class="f">*</span><span class="b">instance</span><span class="f">;</span>
<a name="232" /><span class="False">     232:</span>     <span class="m">struct</span> <span class="b">lockdep_map</span>        <span class="f">*</span><span class="b">nest_lock</span><span class="f">;</span>
<a name="233" /><span class="False">     233:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_LOCK_STAT</span>
<a name="234" /><span class="False">     234:</span>     <span class="b">u64</span>                 <span class="b">waittime_stamp</span><span class="f">;</span>
<a name="235" /><span class="False">     235:</span>     <span class="b">u64</span>                <span class="b">holdtime_stamp</span><span class="f">;</span>
<a name="236" /><span class="False">     236:</span> <span class="f">#</span><span class="n">endif</span>
<a name="237" /><span class="False">     237:</span>     <span class="m">unsigned</span> <span class="m">int</span>            <span class="b">class_idx</span><span class="f">:</span><span class="b">MAX_LOCKDEP_KEYS_BITS</span><span class="f">;</span>
<a name="238" /><span class="False">     238:</span>     <span class="k">/*</span>
<a name="239" /><span class="False">     239:</span> <span class="k">     * The lock-stack is unified in that the lock chains of interrupt</span>
<a name="240" /><span class="False">     240:</span> <span class="k">     * contexts nest ontop of process context chains, but we &apos;separate&apos;</span>
<a name="241" /><span class="False">     241:</span> <span class="k">     * the hashes by starting with 0 if we cross into an interrupt</span>
<a name="242" /><span class="False">     242:</span> <span class="k">     * context, and we also keep do not add cross-context lock</span>
<a name="243" /><span class="False">     243:</span> <span class="k">     * dependencies - the lock usage graph walking covers that area</span>
<a name="244" /><span class="False">     244:</span> <span class="k">     * anyway, and we&apos;d just unnecessarily increase the number of</span>
<a name="245" /><span class="False">     245:</span> <span class="k">     * dependencies otherwise. [Note: hardirq and softirq contexts</span>
<a name="246" /><span class="False">     246:</span> <span class="k">     * are separated from each other too.]</span>
<a name="247" /><span class="False">     247:</span> <span class="k">     *</span>
<a name="248" /><span class="False">     248:</span> <span class="k">     * The following field is used to detect when we cross into an</span>
<a name="249" /><span class="False">     249:</span> <span class="k">     * interrupt context:</span>
<a name="250" /><span class="False">     250:</span> <span class="k">     */</span>
<a name="251" /><span class="False">     251:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">irq_context</span><span class="f">:</span><span class="c">2</span><span class="f">;</span> <span class="k">/* bit 0 - soft, bit 1 - hard */</span>
<a name="252" /><span class="False">     252:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">trylock</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>                        <span class="k">/* 16 bits */</span>
<a name="253" /><span class="False">     253:</span> 
<a name="254" /><span class="False">     254:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">read</span><span class="f">:</span><span class="c">2</span><span class="f">;</span>        <span class="k">/* see lock_acquire() comment */</span>
<a name="255" /><span class="False">     255:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">check</span><span class="f">:</span><span class="c">2</span><span class="f">;</span>       <span class="k">/* see lock_acquire() comment */</span>
<a name="256" /><span class="False">     256:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">hardirqs_off</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="257" /><span class="False">     257:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">references</span><span class="f">:</span><span class="c">11</span><span class="f">;</span>                    <span class="k">/* 32 bits */</span>
<a name="258" /><span class="False">     258:</span> <span class="f">}</span><span class="f">;</span>
<a name="259" /><span class="False">     259:</span> 
<a name="260" /><span class="False">     260:</span> <span class="k">/*</span>
<a name="261" /><span class="False">     261:</span> <span class="k"> * Initialization, self-test and debugging-output methods:</span>
<a name="262" /><span class="False">     262:</span> <span class="k"> */</span>
<a name="263" /><span class="False">     263:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9pbml0XzA_"><span class="b">lockdep_init</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="264" /><span class="False">     264:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9pbmZvXzA_"><span class="b">lockdep_info</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="265" /><span class="False">     265:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9yZXNldF8w"><span class="b">lockdep_reset</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="266" /><span class="False">     266:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">lockdep_reset_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">)</span><span class="f">;</span>
<a name="267" /><span class="False">     267:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9mcmVlX2tleV9yYW5nZV8w"><span class="b">lockdep_free_key_range</span></a><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="b">start</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="268" /><span class="False">     268:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zeXNfZXhpdF8w"><span class="b">lockdep_sys_exit</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="269" /><span class="False">     269:</span> 
<a name="270" /><span class="False">     270:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">lockdep_off</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="271" /><span class="False">     271:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">lockdep_on</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="272" /><span class="False">     272:</span> 
<a name="273" /><span class="False">     273:</span> <span class="k">/*</span>
<a name="274" /><span class="False">     274:</span> <span class="k"> * These methods are used by specific locking variants (spinlocks,</span>
<a name="275" /><span class="False">     275:</span> <span class="k"> * rwlocks, mutexes and rwsems) to pass init/acquire/release events</span>
<a name="276" /><span class="False">     276:</span> <span class="k"> * to lockdep:</span>
<a name="277" /><span class="False">     277:</span> <span class="k"> */</span>
<a name="278" /><span class="False">     278:</span> 
<a name="279" /><span class="False">     279:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_bG9ja2RlcF9pbml0X21hcF8w"><span class="b">lockdep_init_map</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">,</span>
<a name="280" /><span class="False">     280:</span>                  <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="m">int</span> <span class="b">subclass</span><span class="f">)</span><span class="f">;</span>
<a name="281" /><span class="False">     281:</span> 
<a name="282" /><span class="False">     282:</span> <span class="k">/*</span>
<a name="283" /><span class="False">     283:</span> <span class="k"> * To initialize a lockdep_map statically use this macro.</span>
<a name="284" /><span class="False">     284:</span> <span class="k"> * Note that _name must not be NULL.</span>
<a name="285" /><span class="False">     285:</span> <span class="k"> */</span>
<a name="286" /><span class="False">     286:</span> <span class="f">#</span><span class="n">define</span> <span class="b">STATIC_LOCKDEP_MAP_INIT</span><span class="f">(</span><span class="b">_name</span><span class="f">,</span> <span class="b">_key</span><span class="f">)</span> \
<a name="287" /><span class="False">     287:</span>     <span class="f">{</span> <span class="f">.</span><span class="b">name</span> <span class="f">=</span> <span class="f">(</span><span class="b">_name</span><span class="f">)</span><span class="f">,</span> <span class="f">.</span><span class="b">key</span> <span class="f">=</span> <span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="b">_key</span><span class="f">)</span><span class="f">,</span> <span class="f">}</span>
<a name="288" /><span class="False">     288:</span> 
<a name="289" /><span class="False">     289:</span> <span class="k">/*</span>
<a name="290" /><span class="False">     290:</span> <span class="k"> * Reinitialize a lock key - for cases where there is special locking or</span>
<a name="291" /><span class="False">     291:</span> <span class="k"> * special initialization of locks so that the validator gets the scope</span>
<a name="292" /><span class="False">     292:</span> <span class="k"> * of dependencies wrong: they are either too broad (they need a class-split)</span>
<a name="293" /><span class="False">     293:</span> <span class="k"> * or they are too narrow (they suffer from a false class-split):</span>
<a name="294" /><span class="False">     294:</span> <span class="k"> */</span>
<a name="295" /><span class="False">     295:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_bG9ja2RlcF9zZXRfY2xhc3NfMA__"><span class="b">lockdep_set_class</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span> \
<a name="296" /><span class="False">     296:</span>         <a href="cpu.c_macros_ref.html#_bG9ja2RlcF9pbml0X21hcF8w"><span class="b">lockdep_init_map</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <span class="f">#</span><span class="b">key</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="297" /><span class="False">     297:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfY2xhc3NfYW5kX25hbWVfMA__"><span class="b">lockdep_set_class_and_name</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">name</span><span class="f">)</span> \
<a name="298" /><span class="False">     298:</span>         <a href="cpu.c_macros_ref.html#_bG9ja2RlcF9pbml0X21hcF8w"><span class="b">lockdep_init_map</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <span class="b">name</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="299" /><span class="False">     299:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfY2xhc3NfYW5kX3N1YmNsYXNzXzA_"><span class="b">lockdep_set_class_and_subclass</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">sub</span><span class="f">)</span> \
<a name="300" /><span class="False">     300:</span>         <a href="cpu.c_macros_ref.html#_bG9ja2RlcF9pbml0X21hcF8w"><span class="b">lockdep_init_map</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <span class="f">#</span><span class="b">key</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">sub</span><span class="f">)</span>
<a name="301" /><span class="False">     301:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfc3ViY2xhc3NfMA__"><span class="b">lockdep_set_subclass</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">sub</span><span class="f">)</span>    \
<a name="302" /><span class="False">     302:</span>         <a href="cpu.c_macros_ref.html#_bG9ja2RlcF9pbml0X21hcF8w"><span class="b">lockdep_init_map</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <span class="f">#</span><span class="b">lock</span><span class="f">,</span> \
<a name="303" /><span class="False">     303:</span>                  <span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">.</span><span class="b">key</span><span class="f">,</span> <span class="b">sub</span><span class="f">)</span>
<a name="304" /><span class="False">     304:</span> 
<a name="305" /><span class="False">     305:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfbm92YWxpZGF0ZV9jbGFzc18w"><span class="b">lockdep_set_novalidate_class</span></a><span class="f">(</span><span class="b">lock</span><span class="f">)</span> \
<a name="306" /><span class="False">     306:</span>     <a href="cpu.c_macros_ref.html#_bG9ja2RlcF9zZXRfY2xhc3NfMA__"><span class="b">lockdep_set_class</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">__lockdep_no_validate__</span><span class="f">)</span>
<a name="307" /><span class="False">     307:</span> <span class="k">/*</span>
<a name="308" /><span class="False">     308:</span> <span class="k"> * Compare locking classes</span>
<a name="309" /><span class="False">     309:</span> <span class="k"> */</span>
<a name="310" /><span class="False">     310:</span> <span class="f">#</span><span class="n">define</span> <span class="b">lockdep_match_class</span><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span> <span class="b">lockdep_match_key</span><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span>
<a name="311" /><span class="False">     311:</span> 
<a name="312" /><span class="False">     312:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">lockdep_match_key</span><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span>
<a name="313" /><span class="False">     313:</span>                     <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="314" /><span class="False">     314:</span> <span class="f">{</span>
<a name="315" /><span class="False">     315:</span>     <span class="m">return</span> <span class="b">lock</span><span class="f">-&gt;</span><span class="b">key</span> <span class="f">==</span> <span class="b">key</span><span class="f">;</span>
<a name="316" /><span class="False">     316:</span> <span class="f">}</span>
<a name="317" /><span class="False">     317:</span> 
<a name="318" /><span class="False">     318:</span> <span class="k">/*</span>
<a name="319" /><span class="False">     319:</span> <span class="k"> * Acquire a lock.</span>
<a name="320" /><span class="False">     320:</span> <span class="k"> *</span>
<a name="321" /><span class="False">     321:</span> <span class="k"> * Values for &quot;read&quot;:</span>
<a name="322" /><span class="False">     322:</span> <span class="k"> *</span>
<a name="323" /><span class="False">     323:</span> <span class="k"> *   0: exclusive (write) acquire</span>
<a name="324" /><span class="False">     324:</span> <span class="k"> *   1: read-acquire (no recursion allowed)</span>
<a name="325" /><span class="False">     325:</span> <span class="k"> *   2: read-acquire with same-instance recursion allowed</span>
<a name="326" /><span class="False">     326:</span> <span class="k"> *</span>
<a name="327" /><span class="False">     327:</span> <span class="k"> * Values for check:</span>
<a name="328" /><span class="False">     328:</span> <span class="k"> *</span>
<a name="329" /><span class="False">     329:</span> <span class="k"> *   0: disabled</span>
<a name="330" /><span class="False">     330:</span> <span class="k"> *   1: simple checks (freeing, held-at-exit-time, etc.)</span>
<a name="331" /><span class="False">     331:</span> <span class="k"> *   2: full validation</span>
<a name="332" /><span class="False">     332:</span> <span class="k"> */</span>
<a name="333" /><span class="False">     333:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">subclass</span><span class="f">,</span>
<a name="334" /><span class="False">     334:</span>              <span class="m">int</span> <span class="b">trylock</span><span class="f">,</span> <span class="m">int</span> <span class="b">read</span><span class="f">,</span> <span class="m">int</span> <span class="b">check</span><span class="f">,</span>
<a name="335" /><span class="False">     335:</span>              <span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">nest_lock</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">ip</span><span class="f">)</span><span class="f">;</span>
<a name="336" /><span class="False">     336:</span> 
<a name="337" /><span class="False">     337:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span> <span class="m">int</span> <span class="b">nested</span><span class="f">,</span>
<a name="338" /><span class="False">     338:</span>              <span class="m">unsigned</span> <span class="m">long</span> <span class="b">ip</span><span class="f">)</span><span class="f">;</span>
<a name="339" /><span class="False">     339:</span> 
<a name="340" /><span class="False">     340:</span> <span class="f">#</span><span class="n">define</span> <span class="b">lockdep_is_held</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span>    <span class="b">lock_is_held</span><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">)</span>
<a name="341" /><span class="False">     341:</span> 
<a name="342" /><span class="False">     342:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">lock_is_held</span><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">)</span><span class="f">;</span>
<a name="343" /><span class="False">     343:</span> 
<a name="344" /><span class="False">     344:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja19zZXRfY2xhc3NfMA__"><span class="b">lock_set_class</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">,</span>
<a name="345" /><span class="False">     345:</span>                <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">subclass</span><span class="f">,</span>
<a name="346" /><span class="False">     346:</span>                <span class="m">unsigned</span> <span class="m">long</span> <span class="b">ip</span><span class="f">)</span><span class="f">;</span>
<a name="347" /><span class="False">     347:</span> 
<a name="348" /><span class="False">     348:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja19zZXRfc3ViY2xhc3NfMA__"><span class="b">lock_set_subclass</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span>
<a name="349" /><span class="False">     349:</span>         <span class="m">unsigned</span> <span class="m">int</span> <span class="b">subclass</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">ip</span><span class="f">)</span>
<a name="350" /><span class="False">     350:</span> <span class="f">{</span>
<a name="351" /><span class="False">     351:</span>     <a href="cpu.c_macros_noref.html#_bG9ja19zZXRfY2xhc3NfMA__"><span class="b">lock_set_class</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">lock</span><span class="f">-&gt;</span><span class="b">name</span><span class="f">,</span> <span class="b">lock</span><span class="f">-&gt;</span><span class="b">key</span><span class="f">,</span> <span class="b">subclass</span><span class="f">,</span> <span class="b">ip</span><span class="f">)</span><span class="f">;</span>
<a name="352" /><span class="False">     352:</span> <span class="f">}</span>
<a name="353" /><span class="False">     353:</span> 
<a name="354" /><span class="False">     354:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfY3VycmVudF9yZWNsYWltX3N0YXRlXzA_"><span class="b">lockdep_set_current_reclaim_state</span></a><span class="f">(</span><span class="b">gfp_t</span> <span class="b">gfp_mask</span><span class="f">)</span><span class="f">;</span>
<a name="355" /><span class="False">     355:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9jbGVhcl9jdXJyZW50X3JlY2xhaW1fc3RhdGVfMA__"><span class="b">lockdep_clear_current_reclaim_state</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="356" /><span class="False">     356:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF90cmFjZV9hbGxvY18w"><span class="b">lockdep_trace_alloc</span></a><span class="f">(</span><span class="b">gfp_t</span> <span class="b">mask</span><span class="f">)</span><span class="f">;</span>
<a name="357" /><span class="False">     357:</span> 
<a name="358" /><span class="False">     358:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU5JVF9MT0NLREVQXzA_"><span class="b">INIT_LOCKDEP</span></a>                <span class="f">.</span><span class="b">lockdep_recursion</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span> <span class="f">.</span><span class="b">lockdep_reclaim_gfp</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span>
<a name="359" /><span class="False">     359:</span> 
<a name="360" /><span class="False">     360:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9kZXB0aF8w"><span class="b">lockdep_depth</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span>    <span class="f">(</span><span class="b">debug_locks</span> <span class="f">?</span> <span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">-&gt;</span><a href="cpu.c_macros_noref.html#_bG9ja2RlcF9kZXB0aF8w"><span class="b">lockdep_depth</span></a> <span class="f">:</span> <span class="c">0</span><span class="f">)</span>
<a name="361" /><span class="False">     361:</span> 
<a name="362" /><span class="False">     362:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9hc3NlcnRfaGVsZF8w"><span class="b">lockdep_assert_held</span></a><span class="f">(</span><span class="b">l</span><span class="f">)</span>    <span class="m">do</span> <span class="f">{</span>                \
<a name="363" /><span class="False">     363:</span>         <a href="cpu.c_macros_ref.html#_V0FSTl9PTl8w"><span class="b">WARN_ON</span></a><span class="f">(</span><span class="b">debug_locks</span> <span class="f">&amp;&amp;</span> <span class="f">!</span><span class="b">lockdep_is_held</span><span class="f">(</span><span class="b">l</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>    \
<a name="364" /><span class="False">     364:</span>     <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="365" /><span class="False">     365:</span> 
<a name="366" /><span class="False">     366:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9yZWN1cnNpbmdfMA__"><span class="b">lockdep_recursing</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">tsk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">lockdep_recursion</span><span class="f">)</span>
<a name="367" /><span class="False">     367:</span> 
<a name="368" /><span class="Maybe">     368:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !CONFIG_LOCKDEP */</span>
<a name="369" /><span class="Maybe">     369:</span> 
<a name="370" /><span class="Maybe">     370:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">lockdep_off</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="371" /><span class="Maybe">     371:</span> <span class="f">{</span>
<a name="372" /><span class="Maybe">     372:</span> <span class="f">}</span>
<a name="373" /><span class="Maybe">     373:</span> 
<a name="374" /><span class="Maybe">     374:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">lockdep_on</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="375" /><span class="Maybe">     375:</span> <span class="f">{</span>
<a name="376" /><span class="Maybe">     376:</span> <span class="f">}</span>
<a name="377" /><span class="Maybe">     377:</span> 
<a name="378" /><span class="Maybe">     378:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">r</span><span class="f">,</span> <span class="b">c</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>    <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="379" /><span class="Maybe">     379:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>            <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="380" /><span class="Maybe">     380:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja19zZXRfY2xhc3NfMA__"><span class="b">lock_set_class</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">k</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="381" /><span class="Maybe">     381:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja19zZXRfc3ViY2xhc3NfMA__"><span class="b">lock_set_subclass</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="382" /><span class="Maybe">     382:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfY3VycmVudF9yZWNsYWltX3N0YXRlXzA_"><span class="b">lockdep_set_current_reclaim_state</span></a><span class="f">(</span><span class="b">g</span><span class="f">)</span>    <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="383" /><span class="Maybe">     383:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9jbGVhcl9jdXJyZW50X3JlY2xhaW1fc3RhdGVfMA__"><span class="b">lockdep_clear_current_reclaim_state</span></a><span class="f">(</span><span class="f">)</span>    <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="384" /><span class="Maybe">     384:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF90cmFjZV9hbGxvY18w"><span class="b">lockdep_trace_alloc</span></a><span class="f">(</span><span class="b">g</span><span class="f">)</span>            <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="385" /><span class="Maybe">     385:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9pbml0XzA_"><span class="b">lockdep_init</span></a><span class="f">(</span><span class="f">)</span>                <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="386" /><span class="Maybe">     386:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9pbmZvXzA_"><span class="b">lockdep_info</span></a><span class="f">(</span><span class="f">)</span>                <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="387" /><span class="Maybe">     387:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_ref.html#_bG9ja2RlcF9pbml0X21hcF8w"><span class="b">lockdep_init_map</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">name</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">sub</span><span class="f">)</span> \
<a name="388" /><span class="Maybe">     388:</span>         <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">(</span><span class="b">name</span><span class="f">)</span><span class="f">;</span> <span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="389" /><span class="Maybe">     389:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_ref.html#_bG9ja2RlcF9zZXRfY2xhc3NfMA__"><span class="b">lockdep_set_class</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span>        <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="390" /><span class="Maybe">     390:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfY2xhc3NfYW5kX25hbWVfMA__"><span class="b">lockdep_set_class_and_name</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">name</span><span class="f">)</span> \
<a name="391" /><span class="Maybe">     391:</span>         <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span> <span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">(</span><span class="b">name</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="392" /><span class="Maybe">     392:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfY2xhc3NfYW5kX3N1YmNsYXNzXzA_"><span class="b">lockdep_set_class_and_subclass</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">sub</span><span class="f">)</span> \
<a name="393" /><span class="Maybe">     393:</span>         <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="394" /><span class="Maybe">     394:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfc3ViY2xhc3NfMA__"><span class="b">lockdep_set_subclass</span></a><span class="f">(</span><span class="b">lock</span><span class="f">,</span> <span class="b">sub</span><span class="f">)</span>        <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="395" /><span class="Maybe">     395:</span> 
<a name="396" /><span class="Maybe">     396:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zZXRfbm92YWxpZGF0ZV9jbGFzc18w"><span class="b">lockdep_set_novalidate_class</span></a><span class="f">(</span><span class="b">lock</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="397" /><span class="Maybe">     397:</span> 
<a name="398" /><span class="Maybe">     398:</span> <span class="k">/*</span>
<a name="399" /><span class="Maybe">     399:</span> <span class="k"> * We don&apos;t define lockdep_match_class() and lockdep_match_key() for !LOCKDEP</span>
<a name="400" /><span class="Maybe">     400:</span> <span class="k"> * case since the result is not well defined and the caller should rather</span>
<a name="401" /><span class="Maybe">     401:</span> <span class="k"> * #ifdef the call himself.</span>
<a name="402" /><span class="Maybe">     402:</span> <span class="k"> */</span>
<a name="403" /><span class="Maybe">     403:</span> 
<a name="404" /><span class="Maybe">     404:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU5JVF9MT0NLREVQXzA_"><span class="b">INIT_LOCKDEP</span></a>
<a name="405" /><span class="Maybe">     405:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9yZXNldF8w"><span class="b">lockdep_reset</span></a><span class="f">(</span><span class="f">)</span>        <span class="m">do</span> <span class="f">{</span> <span class="b">debug_locks</span> <span class="f">=</span> <span class="c">1</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="406" /><span class="Maybe">     406:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9mcmVlX2tleV9yYW5nZV8w"><span class="b">lockdep_free_key_range</span></a><span class="f">(</span><span class="b">start</span><span class="f">,</span> <span class="b">size</span><span class="f">)</span>    <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="407" /><span class="Maybe">     407:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9zeXNfZXhpdF8w"><span class="b">lockdep_sys_exit</span></a><span class="f">(</span><span class="f">)</span>             <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="408" /><span class="Maybe">     408:</span> <span class="k">/*</span>
<a name="409" /><span class="Maybe">     409:</span> <span class="k"> * The class key takes no space if lockdep is disabled:</span>
<a name="410" /><span class="Maybe">     410:</span> <span class="k"> */</span>
<a name="411" /><span class="Maybe">     411:</span> <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="f">{</span> <span class="f">}</span><span class="f">;</span>
<a name="412" /><span class="Maybe">     412:</span> 
<a name="413" /><span class="Maybe">     413:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9kZXB0aF8w"><span class="b">lockdep_depth</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span>    <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="414" /><span class="Maybe">     414:</span> 
<a name="415" /><span class="Maybe">     415:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9hc3NlcnRfaGVsZF8w"><span class="b">lockdep_assert_held</span></a><span class="f">(</span><span class="b">l</span><span class="f">)</span>            <span class="m">do</span> <span class="f">{</span> <span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">(</span><span class="b">l</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="416" /><span class="Maybe">     416:</span> 
<a name="417" /><span class="Maybe">     417:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja2RlcF9yZWN1cnNpbmdfMA__"><span class="b">lockdep_recursing</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span>            <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="418" /><span class="Maybe">     418:</span> 
<a name="419" /><span class="Maybe">     419:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* !LOCKDEP */</span>
<a name="420" /><span class="Maybe">     420:</span> 
<a name="421" /><span class="False">     421:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_LOCK_STAT</span>
<a name="422" /><span class="False">     422:</span> 
<a name="423" /><span class="False">     423:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja19jb250ZW5kZWRfMA__"><span class="b">lock_contended</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">ip</span><span class="f">)</span><span class="f">;</span>
<a name="424" /><span class="False">     424:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_noref.html#_bG9ja19hY3F1aXJlZF8w"><span class="b">lock_acquired</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="b">lock</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">ip</span><span class="f">)</span><span class="f">;</span>
<a name="425" /><span class="False">     425:</span> 
<a name="426" /><span class="False">     426:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_TE9DS19DT05URU5ERURfMA__"><span class="b">LOCK_CONTENDED</span></a><span class="f">(</span><span class="b">_lock</span><span class="f">,</span> <span class="m">try</span><span class="f">,</span> <span class="b">lock</span><span class="f">)</span>            \
<a name="427" /><span class="False">     427:</span> <span class="m">do</span> <span class="f">{</span>                                \
<a name="428" /><span class="False">     428:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="m">try</span><span class="f">(</span><span class="b">_lock</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>                    \
<a name="429" /><span class="False">     429:</span>         <a href="cpu.c_macros_noref.html#_bG9ja19jb250ZW5kZWRfMA__"><span class="b">lock_contended</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">_lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_X1JFVF9JUF9fMA__"><span class="b">_RET_IP_</span></a><span class="f">)</span><span class="f">;</span>    \
<a name="430" /><span class="False">     430:</span>         <span class="b">lock</span><span class="f">(</span><span class="b">_lock</span><span class="f">)</span><span class="f">;</span>                    \
<a name="431" /><span class="False">     431:</span>     <span class="f">}</span>                            \
<a name="432" /><span class="False">     432:</span>     <a href="cpu.c_macros_noref.html#_bG9ja19hY3F1aXJlZF8w"><span class="b">lock_acquired</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">_lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_X1JFVF9JUF9fMA__"><span class="b">_RET_IP_</span></a><span class="f">)</span><span class="f">;</span>            \
<a name="433" /><span class="False">     433:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="434" /><span class="False">     434:</span> 
<a name="435" /><span class="Maybe">     435:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* CONFIG_LOCK_STAT */</span>
<a name="436" /><span class="Maybe">     436:</span> 
<a name="437" /><span class="Maybe">     437:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja19jb250ZW5kZWRfMA__"><span class="b">lock_contended</span></a><span class="f">(</span><span class="b">lockdep_map</span><span class="f">,</span> <span class="b">ip</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span><span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="438" /><span class="Maybe">     438:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja19hY3F1aXJlZF8w"><span class="b">lock_acquired</span></a><span class="f">(</span><span class="b">lockdep_map</span><span class="f">,</span> <span class="b">ip</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span><span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="439" /><span class="Maybe">     439:</span> 
<a name="440" /><span class="Maybe">     440:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_TE9DS19DT05URU5ERURfMA__"><span class="b">LOCK_CONTENDED</span></a><span class="f">(</span><span class="b">_lock</span><span class="f">,</span> <span class="m">try</span><span class="f">,</span> <span class="b">lock</span><span class="f">)</span> \
<a name="441" /><span class="Maybe">     441:</span>     <span class="b">lock</span><span class="f">(</span><span class="b">_lock</span><span class="f">)</span>
<a name="442" /><span class="Maybe">     442:</span> 
<a name="443" /><span class="Maybe">     443:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_LOCK_STAT */</span>
<a name="444" /><span class="Maybe">     444:</span> 
<a name="445" /><span class="False">     445:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_LOCKDEP</span>
<a name="446" /><span class="False">     446:</span> 
<a name="447" /><span class="False">     447:</span> <span class="k">/*</span>
<a name="448" /><span class="False">     448:</span> <span class="k"> * On lockdep we dont want the hand-coded irq-enable of</span>
<a name="449" /><span class="False">     449:</span> <span class="k"> * _raw_*_lock_flags() code, because lockdep assumes</span>
<a name="450" /><span class="False">     450:</span> <span class="k"> * that interrupts are not re-enabled during lock-acquire:</span>
<a name="451" /><span class="False">     451:</span> <span class="k"> */</span>
<a name="452" /><span class="False">     452:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_TE9DS19DT05URU5ERURfRkxBR1NfMA__"><span class="b">LOCK_CONTENDED_FLAGS</span></a><span class="f">(</span><span class="b">_lock</span><span class="f">,</span> <span class="m">try</span><span class="f">,</span> <span class="b">lock</span><span class="f">,</span> <span class="b">lockfl</span><span class="f">,</span> <span class="b">flags</span><span class="f">)</span> \
<a name="453" /><span class="False">     453:</span>     <a href="cpu.c_macros_ref.html#_TE9DS19DT05URU5ERURfMA__"><span class="b">LOCK_CONTENDED</span></a><span class="f">(</span><span class="f">(</span><span class="b">_lock</span><span class="f">)</span><span class="f">,</span> <span class="f">(</span><span class="m">try</span><span class="f">)</span><span class="f">,</span> <span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">)</span>
<a name="454" /><span class="False">     454:</span> 
<a name="455" /><span class="Maybe">     455:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* CONFIG_LOCKDEP */</span>
<a name="456" /><span class="Maybe">     456:</span> 
<a name="457" /><span class="Maybe">     457:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_TE9DS19DT05URU5ERURfRkxBR1NfMA__"><span class="b">LOCK_CONTENDED_FLAGS</span></a><span class="f">(</span><span class="b">_lock</span><span class="f">,</span> <span class="m">try</span><span class="f">,</span> <span class="b">lock</span><span class="f">,</span> <span class="b">lockfl</span><span class="f">,</span> <span class="b">flags</span><span class="f">)</span> \
<a name="458" /><span class="Maybe">     458:</span>     <span class="b">lockfl</span><span class="f">(</span><span class="f">(</span><span class="b">_lock</span><span class="f">)</span><span class="f">,</span> <span class="f">(</span><span class="b">flags</span><span class="f">)</span><span class="f">)</span>
<a name="459" /><span class="Maybe">     459:</span> 
<a name="460" /><span class="Maybe">     460:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_LOCKDEP */</span>
<a name="461" /><span class="Maybe">     461:</span> 
<a name="462" /><span class="False">     462:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_TRACE_IRQFLAGS</span>
<a name="463" /><span class="False">     463:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">print_irqtrace_events</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">curr</span><span class="f">)</span><span class="f">;</span>
<a name="464" /><span class="Maybe">     464:</span> <span class="f">#</span><span class="n">else</span>
<a name="465" /><span class="Maybe">     465:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">print_irqtrace_events</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">curr</span><span class="f">)</span>
<a name="466" /><span class="Maybe">     466:</span> <span class="f">{</span>
<a name="467" /><span class="Maybe">     467:</span> <span class="f">}</span>
<a name="468" /><span class="Maybe">     468:</span> <span class="f">#</span><span class="n">endif</span>
<a name="469" /><span class="Maybe">     469:</span> 
<a name="470" /><span class="Maybe">     470:</span> <span class="k">/*</span>
<a name="471" /><span class="Maybe">     471:</span> <span class="k"> * For trivial one-depth nesting of a lock-class, the following</span>
<a name="472" /><span class="Maybe">     472:</span> <span class="k"> * global define can be used. (Subsystems with multiple levels</span>
<a name="473" /><span class="Maybe">     473:</span> <span class="k"> * of nesting should define their own lock-nesting subclasses.)</span>
<a name="474" /><span class="Maybe">     474:</span> <span class="k"> */</span>
<a name="475" /><span class="Maybe">     475:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0lOR0xFX0RFUFRIX05FU1RJTkdfMA__"><span class="b">SINGLE_DEPTH_NESTING</span></a>            <span class="c">1</span>
<a name="476" /><span class="Maybe">     476:</span> 
<a name="477" /><span class="Maybe">     477:</span> <span class="k">/*</span>
<a name="478" /><span class="Maybe">     478:</span> <span class="k"> * Map the dependency ops to NOP or to real lockdep ops, depending</span>
<a name="479" /><span class="Maybe">     479:</span> <span class="k"> * on the per lock-class debug mode:</span>
<a name="480" /><span class="Maybe">     480:</span> <span class="k"> */</span>
<a name="481" /><span class="Maybe">     481:</span> 
<a name="482" /><span class="False">     482:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PROVE_LOCKING</span>
<a name="483" /><span class="False">     483:</span>  <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="484" /><span class="False">     484:</span>  <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja19hY3F1aXJlX3NoYXJlZF8w"><span class="b">lock_acquire_shared</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="485" /><span class="False">     485:</span>  <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX3NoYXJlZF9yZWN1cnNpdmVfMA__"><span class="b">lock_acquire_shared_recursive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="486" /><span class="Maybe">     486:</span> <span class="f">#</span><span class="n">else</span>
<a name="487" /><span class="Maybe">     487:</span>  <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="488" /><span class="Maybe">     488:</span>  <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja19hY3F1aXJlX3NoYXJlZF8w"><span class="b">lock_acquire_shared</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="489" /><span class="Maybe">     489:</span>  <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX3NoYXJlZF9yZWN1cnNpdmVfMA__"><span class="b">lock_acquire_shared_recursive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="490" /><span class="Maybe">     490:</span> <span class="f">#</span><span class="n">endif</span>
<a name="491" /><span class="Maybe">     491:</span> 
<a name="492" /><span class="Maybe">     492:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_c3Bpbl9hY3F1aXJlXzA_"><span class="b">spin_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="493" /><span class="Maybe">     493:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c3Bpbl9hY3F1aXJlX25lc3RfMA__"><span class="b">spin_acquire_nest</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="494" /><span class="Maybe">     494:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_c3Bpbl9yZWxlYXNlXzA_"><span class="b">spin_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>            <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="495" /><span class="Maybe">     495:</span> 
<a name="496" /><span class="Maybe">     496:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_cndsb2NrX2FjcXVpcmVfMA__"><span class="b">rwlock_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="497" /><span class="Maybe">     497:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_cndsb2NrX2FjcXVpcmVfcmVhZF8w"><span class="b">rwlock_acquire_read</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX3NoYXJlZF9yZWN1cnNpdmVfMA__"><span class="b">lock_acquire_shared_recursive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="498" /><span class="Maybe">     498:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_cndsb2NrX3JlbGVhc2VfMA__"><span class="b">rwlock_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>            <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="499" /><span class="Maybe">     499:</span> 
<a name="500" /><span class="Maybe">     500:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_c2VxY291bnRfYWNxdWlyZV8w"><span class="b">seqcount_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="501" /><span class="Maybe">     501:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c2VxY291bnRfYWNxdWlyZV9yZWFkXzA_"><span class="b">seqcount_acquire_read</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX3NoYXJlZF9yZWN1cnNpdmVfMA__"><span class="b">lock_acquire_shared_recursive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="502" /><span class="Maybe">     502:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_c2VxY291bnRfcmVsZWFzZV8w"><span class="b">seqcount_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="503" /><span class="Maybe">     503:</span> 
<a name="504" /><span class="Maybe">     504:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bXV0ZXhfYWNxdWlyZV8w"><span class="b">mutex_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="505" /><span class="Maybe">     505:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bXV0ZXhfYWNxdWlyZV9uZXN0XzA_"><span class="b">mutex_acquire_nest</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="506" /><span class="Maybe">     506:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bXV0ZXhfcmVsZWFzZV8w"><span class="b">mutex_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>            <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="507" /><span class="Maybe">     507:</span> 
<a name="508" /><span class="Maybe">     508:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cndzZW1fYWNxdWlyZV8w"><span class="b">rwsem_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="509" /><span class="Maybe">     509:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cndzZW1fYWNxdWlyZV9uZXN0XzA_"><span class="b">rwsem_acquire_nest</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="510" /><span class="Maybe">     510:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cndzZW1fYWNxdWlyZV9yZWFkXzA_"><span class="b">rwsem_acquire_read</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>        <a href="cpu.c_macros_noref.html#_bG9ja19hY3F1aXJlX3NoYXJlZF8w"><span class="b">lock_acquire_shared</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">s</span><span class="f">,</span> <span class="b">t</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="511" /><span class="Maybe">     511:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cndzZW1fcmVsZWFzZV8w"><span class="b">rwsem_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>            <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span>
<a name="512" /><span class="Maybe">     512:</span> 
<a name="513" /><span class="Maybe">     513:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja19tYXBfYWNxdWlyZV8w"><span class="b">lock_map_acquire</span></a><span class="f">(</span><span class="b">l</span><span class="f">)</span>            <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX2V4Y2x1c2l2ZV8w"><span class="b">lock_acquire_exclusive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <a href="cpu.c_macros_noref.html#_X1RISVNfSVBfXzA_"><span class="b">_THIS_IP_</span></a><span class="f">)</span>
<a name="514" /><span class="Maybe">     514:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja19tYXBfYWNxdWlyZV9yZWFkXzA_"><span class="b">lock_map_acquire_read</span></a><span class="f">(</span><span class="b">l</span><span class="f">)</span>        <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlX3NoYXJlZF9yZWN1cnNpdmVfMA__"><span class="b">lock_acquire_shared_recursive</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <a href="cpu.c_macros_noref.html#_X1RISVNfSVBfXzA_"><span class="b">_THIS_IP_</span></a><span class="f">)</span>
<a name="515" /><span class="Maybe">     515:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bG9ja19tYXBfcmVsZWFzZV8w"><span class="b">lock_map_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">)</span>            <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="b">l</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_X1RISVNfSVBfXzA_"><span class="b">_THIS_IP_</span></a><span class="f">)</span>
<a name="516" /><span class="Maybe">     516:</span> 
<a name="517" /><span class="False">     517:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PROVE_LOCKING</span>
<a name="518" /><span class="False">     518:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bWlnaHRfbG9ja18w"><span class="b">might_lock</span></a><span class="f">(</span><span class="b">lock</span><span class="f">)</span>                         \
<a name="519" /><span class="False">     519:</span> <span class="m">do</span> <span class="f">{</span>                                    \
<a name="520" /><span class="False">     520:</span>     <a href="cpu.c_macros_ref.html#_dHlwZWNoZWNrXzA_"><span class="b">typecheck</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="f">,</span> <span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">)</span><span class="f">;</span>        \
<a name="521" /><span class="False">     521:</span>     <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <a href="cpu.c_macros_noref.html#_X1RISVNfSVBfXzA_"><span class="b">_THIS_IP_</span></a><span class="f">)</span><span class="f">;</span>    \
<a name="522" /><span class="False">     522:</span>     <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_X1RISVNfSVBfXzA_"><span class="b">_THIS_IP_</span></a><span class="f">)</span><span class="f">;</span>            \
<a name="523" /><span class="False">     523:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="524" /><span class="False">     524:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bWlnaHRfbG9ja19yZWFkXzA_"><span class="b">might_lock_read</span></a><span class="f">(</span><span class="b">lock</span><span class="f">)</span>                         \
<a name="525" /><span class="False">     525:</span> <span class="m">do</span> <span class="f">{</span>                                    \
<a name="526" /><span class="False">     526:</span>     <a href="cpu.c_macros_ref.html#_dHlwZWNoZWNrXzA_"><span class="b">typecheck</span></a><span class="f">(</span><span class="m">struct</span> <span class="b">lockdep_map</span> <span class="f">*</span><span class="f">,</span> <span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">)</span><span class="f">;</span>        \
<a name="527" /><span class="False">     527:</span>     <a href="cpu.c_macros_ref.html#_bG9ja19hY3F1aXJlXzA_"><span class="b">lock_acquire</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <a href="cpu.c_macros_noref.html#_X1RISVNfSVBfXzA_"><span class="b">_THIS_IP_</span></a><span class="f">)</span><span class="f">;</span>    \
<a name="528" /><span class="False">     528:</span>     <a href="cpu.c_macros_ref.html#_bG9ja19yZWxlYXNlXzA_"><span class="b">lock_release</span></a><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">lock</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dep_map</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_X1RISVNfSVBfXzA_"><span class="b">_THIS_IP_</span></a><span class="f">)</span><span class="f">;</span>            \
<a name="529" /><span class="False">     529:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="530" /><span class="Maybe">     530:</span> <span class="f">#</span><span class="n">else</span>
<a name="531" /><span class="Maybe">     531:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bWlnaHRfbG9ja18w"><span class="b">might_lock</span></a><span class="f">(</span><span class="b">lock</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="532" /><span class="Maybe">     532:</span> <span class="f">#</span> <span class="n">define</span> <a href="cpu.c_macros_noref.html#_bWlnaHRfbG9ja19yZWFkXzA_"><span class="b">might_lock_read</span></a><span class="f">(</span><span class="b">lock</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="533" /><span class="Maybe">     533:</span> <span class="f">#</span><span class="n">endif</span>
<a name="534" /><span class="Maybe">     534:</span> 
<a name="535" /><span class="False">     535:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_PROVE_RCU</span>
<a name="536" /><span class="False">     536:</span> <span class="m">void</span> <span class="b">lockdep_rcu_suspicious</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">const</span> <span class="m">int</span> <span class="b">line</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">s</span><span class="f">)</span><span class="f">;</span>
<a name="537" /><span class="Maybe">     537:</span> <span class="f">#</span><span class="n">endif</span>
<a name="538" /><span class="Maybe">     538:</span> 
<a name="539" /><span class="True">     539:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* __LINUX_LOCKDEP_H */</span>
<a name="540" /><span class="True">     540:</span> </pre>
  </body>
</html>
